#include "stdafx.h"
#include "Fakes/FakeD3D11Device.h"
#include "Fakes/FakeD3D11Predicate.h"

DESCRIPTION_11_TEST_SUITE_CTOR(PredicateDescription, (D3D11_QUERY_OCCLUSION_PREDICATE))

BOOST_FIXTURE_TEST_CASE(Default, TestPredicateDescription)
{
	BOOST_REQUIRE_EQUAL(D3D11_QUERY_OCCLUSION_PREDICATE, m_desc.Query);
}

BOOST_FIXTURE_TEST_CASE(Create, TestPredicateDescription)
{
	FakeD3D11Device device;
	FakeD3D11Predicate query;
	device.CreatePredicateFakeResult = &query;
	device.CreatePredicateFakeHResult = S_OK;
	ID3D11Predicate *result = m_desc.Create(&device);
	BOOST_REQUIRE(device.CreatePredicateCalled);
	BOOST_REQUIRE_EQUAL(&m_desc, device.CreatePredicateLastDesc);
	BOOST_REQUIRE_EQUAL(&query, result);
}

BOOST_AUTO_TEST_SUITE_END()
